//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

package uxgenes.core;

import android.app.Application;
import android.content.Context;


public final class UXApplication extends Application
{
// variables //
    private static Context	_context;

    
// methods //
    
    // onCreate
    public final void onCreate ()
    {
        super.onCreate();
        UXApplication._context = getApplicationContext();
    }

    
    // GetContext
    public static final Context GetContext ()
    {
        return UXApplication._context;
    }
    

	// GetPackageName
	public static final String GetPackageName ()
	{
		return UXApplication.GetContext().getPackageName();
	}
	
	
	// GetString
	public static final String GetString (int stringId)
	{
		try {
			return GetContext().getString( stringId );
		}
		catch (Exception e)
		{}
		return null;
	}
}
